var page = require('webpage').create();
page.open('https://github.com/ShowLuu', function() {
    sleep(10);
    let res = page.render('/Users/zhanglu/Desktop/lu/workspace/dev_workspace/idea/学习/JavaBase/JavaBase/src/main/java/PhantomJS/PhantomJS.png');
    console.log(res);
    phantom.exit();
});

function sleep(delay) {
    var start = (new Date()).getTime();
    while ((new Date()).getTime() - start < delay) {
        continue;
    }
}
